--local db_handler = require("DbHandler")
require("DbHandler")
--table.foreach(db_handler,print)
 function walk_table(t)
         print"-------------------"

         for k,v in pairs(t) do

                   print(k, " = ", v)
         end
         print"-------------------\n"

end
--local dbh = db_handler.DbHandler:new()
local dbh = DbHandler.DbHandler:new()
print('after new----------------')
local sql = [==[select * from dlzj; ]==]
local res = dbh:query(sql)
local colnames = res:getcolnames()
local coltypes = res:getcoltypes()
--dbh:walk_table(colnames)
print('=====================')
--dbh:walk_table(coltypes)
print('=====================')
local data_set = {}
print(data_set)
for t in dbh:fetch(res) do
	walk_table(t)
end

